package com.swancloud.model.network.v20210120.lbaasv2;

import com.fasterxml.jackson.annotation.JsonCreator;

/**
 * Operating status of a load balancer v2
 */
public enum LbV2OperatingStatus {
    ONLINE,
    DRAINING,
    OFFLINE,
    DEGRADED,
    ERROR,
    NO_MONITOR;

    @JsonCreator
    public static LbV2OperatingStatus forValue(String value) {
        if (value != null) {
            for (LbV2OperatingStatus s : LbV2OperatingStatus.values()) {
                if (s.name().equalsIgnoreCase(value)) {
                    return s;
                }
            }
        }
        return LbV2OperatingStatus.OFFLINE;
    }
}
